<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String basePath = request.getContextPath();
  Object email = request.getSession().getAttribute("email");
  Object roleIdTemp = request.getSession().getAttribute("roleId");
  Integer roleId = -1;
  if (roleIdTemp != null) {
    roleId = Integer.parseInt(roleIdTemp.toString());
  }
%>
<html>
<head>
  <title>商户后台</title>
  <jsp:include page="common/common-css.jsp"></jsp:include>
  <jsp:include page="common/common-js.jsp"></jsp:include>

  <style type="text/css">
    tr {
      border-bottom: 1px solid #eaeaea;
    }

    td {
      padding: 10px;
    }

    a {
      text-decoration: none
    }

    a:hover {
      text-decoration: none
    }

    a:link {
      text-decoration: none
    }

    a:visited {
      text-decoration: none
    }

  </style>
</head>
<body style="background-color: #f5f5f5">
<jsp:include page="../head.jsp"></jsp:include>
<div class="container-fluid" style="padding: 0px">
  <% if (roleId == 1) {%>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
       style="margin-top: 15px;padding: 0px;background-color: #ffffff">
    <table style="width: 100%">
      <tr>
        <td><a target='_self' href='<%=basePath%>/userMgr'>
          <div><i class="icon-user icon-large"
                  style="margin-right: 10px;color: magenta"></i>用户管理
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
    </table>
  </div>
  <%}%>
  <% if (roleId == 2) {%>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
       style="margin-top: 15px;padding: 0px;background-color: #ffffff">
    <table style="width: 100%">
      <tr>
        <td><a target='_self' href='<%=basePath%>/orderMgr'>
          <div><i class="icon-tag icon-large text-default-color"
                  style="margin-right: 10px;color: red"></i>订单管理
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
      <tr>
        <td><a target='_self' href='<%=basePath%>/userMgr'>
          <div><i class="icon-user icon-large text-default-color"
                  style="margin-right: 10px;color: #FFCC00"></i>会员管理
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
    </table>
  </div>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
       style="margin-top: 15px;padding: 0px;background-color: #ffffff">
    <table style="width: 100%">
      <tr>
        <td><a target='_self' href='<%=basePath%>/shop/info'>
          <div><i class="icon-wrench icon-large text-default-color"
                  style="margin-right: 10px;color: deepskyblue"></i>门店管理
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
    </table>
  </div>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
       style="margin-top: 15px;padding: 0px;background-color: #ffffff">
    <table style="width: 100%">
      <tr>
        <td><a target='_self' href='<%=basePath%>/addGood'>
          <div><i class="icon-pencil icon-large"
                  style="margin-right: 10px;color: #66CC33"></i>新增商品
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
      <tr>
        <td><a target='_self' href='<%=basePath%>/goodMgr'>
          <div><i class="icon-desktop" style="margin-right: 10px;color: blueviolet"></i>商品管理
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
      <tr>
        <td><a target='_self' href='<%=basePath%>/productType'>
          <div><i class="icon-th-large" style="margin-right: 10px;color: dodgerblue"></i>商品分类
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
    </table>
  </div>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
       style="margin-top: 15px;padding: 0px;background-color: #ffffff">
    <table style="width: 100%">
      <tr>
        <td>
          <a target='_self' href='<%=basePath%>/writeBulletin'>
            <div>
              <i class="icon-bullhorn" style="margin-right: 10px;color: #66CC33"></i>发公告
            </div>
          </a>
        </td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
      <tr>
        <td><a target='_self' href='<%=basePath%>/writeStory'>
          <div><i class="icon-edit" style="margin-right: 10px;color: blueviolet"></i>写资讯
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
    </table>
  </div>
  <%}%>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
       style="margin-top: 15px;padding: 0px;background-color: #ffffff">
    <table style="width: 100%;">
      <tr>
        <td><a target='_self' href='<%=basePath%>/platDataStatistic'>
          <div><i class="icon-bar-chart"
                  style="margin-right: 10px;color: #00ccff"></i>销售报表
          </div>
        </a></td>
        <td style="width: 10px;color: gray" align="center"><i class="icon-angle-right"></i></td>
      </tr>
    </table>
  </div>
</div>
</div>
<jsp:include page="../foot.jsp"></jsp:include>
<jsp:include page="common/common-html.jsp"></jsp:include>
</body>
<script>
  $(function () {
    initStyle();
    if (!validateEmail('<%=email%>')) {
      return;
    }
  })
</script>
</html>
